package apiday02home;

public class MatchesHome {
    public static void main(String[] args) {
        String email = "zhangwt@520.com";
        String regex = "[a-zA-Z0-9_]+@[a-zA-Z0-9]+(\\.[a-zA-Z]+)+";
        boolean a = email.matches(regex);
        if (a) {
            System.out.println("是正确的邮箱格式");
        } else {
            System.out.println("不是正确的邮箱格式");
        }

    }


}
